import request from '@/utils/request.js'


//未发布商品详情
export function getTradInfo(collection_id) {
	return request({
		url: '/market/trade/collectionDetail',
		method: 'post',
		data: {
			collection_id
		}
	})
}

/**
 * @param {Object} data
 * 获取委托订单列表
 */
export function entrustOrderList(data){
	return request({
		url: '/market/trade/entrustOrderList',
		method: 'post',
		data
	})
}
/**
 * @param {String} order_id
 * 委托订单详情
 */

export function entrustOrderInfo(order_id){
	return request({
		url: '/market/trade/entrustOrderInfo',
		method: 'post',
		data:{
			order_id
		}
	})
}
/**
 * @param {Object} data
 * 取消委托
 */

export function cancelEntrustOrder(data){
	return request({
		url: '/market/trade/cancelEntrustOrder',
		method: 'post',
		data
	})
}
//未发布商品详情
export function createTradOrder(data) {
	return request({
		url: '/market/trade/createBegBuyOrder',
		method: 'post',
		data
	})
}

//获取我的求购订单详情
export function getMyBegInfo(order_id){
	return request({
		url: '/market/trade/begBuyOrderInfo',
		method: 'post',
		data:{
			order_id
		}
	})
}

export function getMyTradeList(data){
	return request({
		url: '/market/trade/begBuyOrderList',
		method: 'post',
		data
	})
}


export function getBegBuyList(data){
	return request({
		url: '/market/trade/begBuyList',
		method: 'post',
		data
	})
}


export function cancelBegBuy(order_id){
	return request({
		url: '/market/trade/cancelBegBuyOrder',
		method: 'post',
		data:{
			order_id
		}
	})
}

export function getSellBegInfo(data){
	return request({
		url: '/market/trade/getSellCollectionInfo',
		method: 'post',
		data
	})
}


export function sell(data){
	return request({
		url:'/market/trade/sell',
		method:"POST",
		data
	})
}


export function getSellInfo(data){
	return request({
		url:"/market/trade/tradingInformation",
		method:"POST",
		data
	})
}

export function vintageTradingInformation(data){
	return request({
		url:"/market/trade/vintage_tradingInformation",
		method:"POST",
		data
	})
}
